package com.benshou.bsoa.common.quartz;

import jakarta.annotation.Resource;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(1)
public class JobCleanupRunner implements ApplicationRunner {

    @Resource
    private JobCleanupService jobCleanupService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        jobCleanupService.cleanupUndefinedJobs();
    }
}